package io.github.xxyopen.novel.dao.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;

public class StuBehavior {
    private Long id; // id
    private Long stuId; // 学生id
    private Long practiceId; // 实践id
    private Integer action; // 行为类型（1-点击，2-点赞，3-收藏，4-评论，5-评分A，6-评分B，7-评分C，8-评分D）
    private Integer insertOrDelete;  // 1表示添加
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    // 评分
    private Integer value;

    // 无参构造方法
    public StuBehavior() {}

    // 有参构造方法


    public StuBehavior(Long id, Long stuId, Long practiceId, Integer action, Integer insertOrDelete) {
        this.id = id;
        this.stuId = stuId;
        this.practiceId = practiceId;
        this.action = action;
        this.insertOrDelete = insertOrDelete;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public Integer getInsertOrDelete() {
        return insertOrDelete;
    }

    public void setInsertOrDelete(Integer insertOrDelete) {
        this.insertOrDelete = insertOrDelete;
    }

    // Getter 和 Setter 方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStuId() {
        return stuId;
    }

    public void setStuId(Long stuId) {
        this.stuId = stuId;
    }

    public Long getPracticeId() {
        return practiceId;
    }

    public void setPracticeId(Long practiceId) {
        this.practiceId = practiceId;
    }

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    @Override
    public String toString() {
        return "StuBehavior{" +
                "id=" + id +
                ", stuId=" + stuId +
                ", practiceId=" + practiceId +
                ", action=" + action +
                '}';
    }
}
